<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%
	String basePath = request.getContextPath() + "/";
%>        
 <!DOCTYPE html>
 <html>
<head>
		<meta charset="utf-8">
		<title>反馈信息</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/display.css"/>
		<!--[if lt IE 9]><script src="<%=basePath %>js/html5.js"></script><![endif]-->	
		<link rel="stylesheet" href="<%=basePath %>js/plugin/kindeditor/themes/default/default.css" />
		<script src="<%=basePath %>js/jquery.min.js"></script>
		<script charset="utf-8" src="<%=basePath %>js/plugin/kindeditor/kindeditor-min.js"></script>		
		<script charset="utf-8" src="<%=basePath %>js/plugin/kindeditor/lang/zh_CN.js"></script>
			
		<script>
			var editor;
			var editorJosn={
					cssPath:'<%=basePath %>js/plugin/kindeditor/plugins/code/prettify.css',
					uploadJson:'<%=basePath %>js/plug/kindeditor/jsp/upload_json.jsp',
					fileManangetJson:'<%=basePath %>js/plug/kindeditor/jsp/file_manager_json.jsp',
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : false,
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'link']
			};
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="feedbackToCustomer"]', editorJosn);
			});
			
		</script>
<style type="text/css">
/* 提交表单 */
.form-table{width:100%;}
.form-table td{
	padding:12px 0;
}
.form-title{
	text-align: right;
	font-size: 12px;
	/* font-weight: bold; */
	vertical-align: top;
	line-height: 24px;
	letter-spacing: 3px;
}
.form-input{
	text-align: left;
}
.form-table .input{
	padding-left: 0;
	padding-right: 0;
	text-indent: 7px;
}
.form-table .textarea{width:90%;}
</style>		
</head>
<body>
<%--    <input type="hidden" id="idWorkOrder" value="${idWorkOrder}"></input> --%>
   <table cellpadding="0" cellspacing="0" border="0" class="form-table"> 		
		<tr>
			<td class="form-title">反馈信息：</td>
			<td colspan="6" class="form-input">
				<textarea class="textarea"  id="feedbackToCustomer" name="feedbackToCustomer"></textarea>
			</td>
	    </tr>
	    <tr>
	       <td colspan="7"><button onclick="feedbackInfo()" class="btn-form ml120">确认</button></td>
	    </tr>  
   </table>
</body>
<script type="text/javascript">
function feedbackInfo(){
	
	editor.sync();
	var feedbackToCustomer=$('#feedbackToCustomer').val();
	if(feedbackToCustomer==''){
		parent.diaAlert('warning','请填写反馈信息');
		return false;
	}else{
		if($.trim(feedbackToCustomer).length <10){
			parent.diaAlert('warning','反馈信息内容不少于10个汉字');
			return false;
	    }		
		if($.trim(feedbackToCustomer).length > 300){
			parent.diaAlert('warning','反馈信息内容不超过300个汉字');
			return false;
	    }
	}	
	var workorderstatus=$("#iframe-"+parent.menu_order,parent.document.body).contents().find("#workOrderStatus").val();
	var dealType=$("#iframe-"+parent.menu_order,parent.document.body).contents().find("#dealType").val();
	var channelSource=$("#iframe-"+parent.menu_order,parent.document.body).contents().find("#channelSourceHidden").val();

    var url='<%=basePath%>executive/workorder/deal';
    if(dealType=='unapproved' || dealType=='reOpen')url='<%=basePath%>manager/workorder/deal';
	$.ajax({
	    type: 'post',
	    url: url,
	    data: {'idWorkOrder':$("#iframe-"+parent.menu_order,parent.document.body).contents().find("#idWorkOrder").val(),'feedbackToCustomer':feedbackToCustomer,'dealType':dealType,'workOrderStatus':workorderstatus,'channelSource':channelSource,'adm':new Date().getTime()},
	    dataType: 'text',
	    success: function(data) {
	    	if($.trim(data) =='000'){    		
	    		art.dialog.close();
	    	}else{
	    		diaAlert('error','操作失败！');
	    	};		    	
	     },
	     error:function(data,textstatus){
	    	 alert("error:"+data);
	     }
	});		
}
</script>
	<script src="<%=basePath %>/js/plugin/artDialog/artDialog.source.js?skin=chrome"></script>
    <script src="<%=basePath %>/js/plugin/artDialog/plugins/iframeTools.source.js"></script>
    <script src="<%=basePath %>js/common.js"></script>
</html>